package com.linkhouse.config;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

    //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000119675246";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key ="MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCHJSr+EpGVmK4PrzPilkwMvrEw5ZNbzXmHuvKwwQB2nXOYkkjwOvEdmEM/JAs92YvcSNOKiUN/V9z48Kudh2k6qVx+MCXPIzTXusRPxCo5gXITXQqRUaK+urh4/zsuQFgI38ttmKDXBFEqoFW0Ig1D1Lc4kQzlhqRhVCkcIED/hD6d6hSomTPOn06ogI10o2QSS4kvmT406sUOLjvvKS6s5YPutw15aC36/0oUuNiKvIXxMcdubigTDk+VQcNUsistVUAte4dN/SBuXrxdxOLInY/vkApPfjL4r/vbfyISCNjL5MRwP0zALYQV6wXqGYctMdN8RX/YTcBrJBSzvWupAgMBAAECggEAQMG7jxEAt4j4ZsWR/BH+kODS8NYgvQ2BHVukLLPeb/fUSxhVYN8tZ/vsxRWVWWajkMNIsgpB0IQeex5/bTVUY+qBSmnxxAZfrLtuk7YwcWuoaMTdanKOpAu+lyPdjLUCOgZaaMKI117XMbCwQGdMqeMEhFNktZrFq2lzZWnDG2vgfZn4WmFBmqVQWmoOurJAjyw5Uia6UFs16BDXQOEI3RdiJobvsvRPKkUt3c8Y1FBgI83ODL0sDPm+SDym+O2cKlRhC1ak/JkchFG8beeGUlqyul2WbtvuJXPWAHcoN9T4F0fJMisdb9llfqZqGgiw2Hq/E33U2j7lEwvqiyvYcQKBgQDronV3bBY/Hf0x9gboFfnJcsXbzGpOOD0TKGVxyleG+kqlA6KtIeoCHtgqmOuq/iH9boG/dYQEF5lLWWRTxyjo12R3CmdughqVaI0emFwL+KS/IByAv57IcirAiYRFr+C+1Qq0CWB6Ns3HGpoBF9e39m32sOobsekn3ErNJLXABQKBgQCS01PC/F/Fg7+fZtx4+btO6UagAb21lbSISX6cdjkuNtiaxH68GkEaYqSl0FStPXxoV0UiTqoj5keXTDPKAwkdnoOgTja3U/3LZ4cVdHGAwHVWj6aHwbpZOT83x58UP/DY4lWB2tTQmthi5IH3Sxje4X9hYtkV33z30uLaeZQiVQKBgB7grxvzIgcrWt6NKuKG3rCzRZJD+zo8zGQSSxjaNxYM/nMZQtwFMbENca5DU76YhsO7E22PbLlMjl39XNRNqOK6NwQSbPNiQTGK/dMgjA9VieExyApnEduaele4rYikP4NCT6DACdB6FgUdS0kRYsdMl6RYEpWGftMmXvb69IYxAoGAXhMHXSylFIG42qJmayDfsczn0oerDNjR5mzosclSE9lSab+y0EUmJ4jCo/da+fEmcBhSlIvAmeXnQvqxSCMvyQmSnrjeeBJZz+USeV21h+BIjmDWO6+V/asfZVcDB098uwox7VTP/KTqNlrhJxi3476qBjT2kPw0LvmxHni9wE0CgYEAmRoJZ1wOM/tEEhRCqXTk7Eb6gQgztyK8M82Swr6atfOY0F/qb7Y2Pt3rYHHzk/nFA+ztqlaK0UMFb62AgbsNUgDPaEr/Sbr6+HmtUBio+28FUesFOnaoX1FNrqIkPTnDSMyHheGV0mbhF2UMyXqT4ARnUFJfQqcwsLbwTqSKflg=";
    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg55ZVV6H5MmwhRwbfdXRMNVZ0mXueqMfmvzVDduVDMRI+gQoS3PAWxNjvB+1mOMakmBlHHMl3jGE1+uzyp4yP+xx34R9BWE0CDKOgB7cvVtyiWaJgH1gQ3kbMq4RfRB1qSzbxkE+PBPIQRgrb9lifE+yW7AyfZ83p03cBrn8dI0Ig5T4IUY4XFKkq1MhQ8I3bEy2NR2StHwCG/Rfbgrj8AC2n/e513K1T5VXzooCI13q6ttcireX/uYfadHEO2iuyuNpjr3CIhq55eu3s8jxizn2ir0eoDfXZPggAebeoV/VLZkBDz0SQZ2OFcjDcQ1ld/bqTPPmDPJ+eDDekFpN0QIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://4812d798n7.qicp.vip/notifyUrl";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://4812d798n7.qicp.vip/returnUrl";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer =null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
